﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public class RandomGenerate : MonoBehaviour
{
    
    void Start()
    {
        for (int i = 0; i < 20; i++)
        {
            var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
            sphere.transform.position = new Vector3(Random.Range(-200, 200),Random.Range(-200, 200),Random.Range(-200, 200));
            var renderer = sphere.AddComponent<MeshRenderer>();
            renderer.material = new Material(Shader.Find("CustomPipeLine/Unlit"));
        }
    }

    
}
